//
//  homePageTitleV.m
//  jiaKaoZhuShou
//
//  Created by 金艺社 on 2018/5/14.
//  Copyright © 2018年 金艺社. All rights reserved.
//

#import "homePageTitleV.h"

@implementation homePageTitleV

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        
        _titleLable = [UILabel new];
        _titleLable.text = @"当前位置";
        _titleLable.textAlignment = NSTextAlignmentCenter;
        _titleLable.font = [UIFont customFontOfSize:15];
        [self addSubview:_titleLable];
        [_titleLable mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.equalTo(@60);
            make.height.equalTo(@20);
            make.centerX.equalTo(self.mas_centerX);
            make.centerY.equalTo(self.mas_centerY);
        }];
        
        _positionView = [UIImageView new];
        [self addSubview:_positionView];
        [_positionView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(_titleLable.mas_left).offset(-2);
            make.top.equalTo(_titleLable.mas_top).offset(1.5);
            make.height.equalTo(@15);
            make.width.equalTo(@12.5);
        }];
        [_positionView setImage:[UIImage imageNamed:@"positioning"]];
        
        _bottomArrowBtn = [UIButton new];
        [_bottomArrowBtn setImage:[UIImage imageNamed:@"bottomArrow"] forState:0];
        [self addSubview:_bottomArrowBtn];
        [_bottomArrowBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_titleLable.mas_right);
            make.top.equalTo(_titleLable.mas_top).offset(-2.5);
            make.width.equalTo(@20);
            make.height.equalTo(@25);
        }];
        
    }
    return self;
}
@end
